package com.tool_stdy.utils.guava;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.collect.Collections2;

public class ListTest {

    public static void main(String[] args) {
        List<String> gList=new ArrayList<String>();
        gList.add("a");
        gList.add("b");
        gList.add("c");
        
       // System.out.println(Joiner.on(",").join(gList));
        
        
        Collection<String> transform2 = Collections2.transform(gList, new Function<String, String>(){
            public String apply(String input) {
                return "'"+input+"'";
            }
        });
        for(String src:transform2){
            System.out.println(src);
        }
        System.out.println(Joiner.on(",").join(transform2));
    }
}
